package com.leyou.auth.controller;

import com.leyou.auth.service.ClientService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/client")
public class ClientController {
    @Resource
    private ClientService clientService;

    @GetMapping("key")
    public ResponseEntity<String> getSecretKey(@RequestParam("clientId") String clientId, @RequestParam("secret") String secret){
       return ResponseEntity.ok(clientService.getSecretKey(clientId,secret));
    }

}
